package event_lite

type Event struct {
	Channel string `json:"channel,omitempty"`
	Payload string `json:"payload,omitempty"` // byte字符串
}

type EventLite interface {
	SendMessage(event Event, target *ServiceProvider) (err error) // 发送消息
	Subscribe(topic string, handler func(e Event))
	StartServer(port int) (err error)
	CreateService(opt ...ServiceOptFunc) (svr *ServiceProvider, err error)
	Stop()
}
